<?php
$sAttendance = UserHandler::getAttendance($_SESSION['rid']);
?>
<div id="layer_user_attendanceadd" class="hidden" style="visibility: visible;">
<form action="index.php" method="post" name="form_user_attendanceadd">
<input type="hidden" name="sAction" value="user-attendanceadd">
<input type="hidden" name="sView" value="user-attendance">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="2"><?php print msg('Write hours') ?></td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Time') ?>:</td>
		<td class="fieldvalue">
			<table cellspacing="0">
				<tr>
					<td class="fieldvalue center small"><?php print msg('Year') ?></td>
					<td class="fieldvalue center small"><?php print msg('Month') ?></td>
					<td class="fieldvalue center small"><?php print msg('Day') ?></td>
				</tr>
				<tr>
					<td class="fieldvalue center small"><input type="text" size="4" maxlength="4" name="iYear" value="<?php print date('Y') ?>" id="focus_user_attendanceadd"></td>
					<td class="fieldvalue center small"><input type="text" size="2" maxlength="2" name="iMonth" value="<?php print date('m') ?>"></td>
					<td class="fieldvalue center small"><input type="text" size="2" maxlength="2" name="iDay" value="<?php print date('d') ?>"></td>
				</tr>
				<tr>
					<td class="fieldvalue center small" colspan="3">
						<?php print msg('Time of day') ?>:
						<input type="text" name="iHour" size="2" maxlength="2" value="<?php print date('H') ?>">
						<input type="text" name="iMinute" size="2" maxlength="2" value="<?php print date('i') ?>">
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('In/Out') ?>:</td>
		<td class="fieldvalue">
			<input type="radio" name="sType" value="coming" <?php print @$sAttendance[0]['type'] != 'coming' ? 'checked' : '' ?>> <?php print msg('In') ?>
			&nbsp;&nbsp;&nbsp;
			<input type="radio" name="sType" value="leaving" <?php print @$sAttendance[0]['type'] == 'coming' ? 'checked' : '' ?>> <?php print msg('Out') ?>
		</td>
	</tr>
	<tr>
		<td class="boxbody center" colspan="2">
			<input type="submit" value="<?php print msg('OK') ?>">
			<input type="button" value="<?php print msg('Cancel') ?>" onClick="layerHide('layer_user_attendanceadd');">
		</td>
	</tr>
</table>
</form>
</div>
